﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PresensiClient.Entity
{
    public class Presensi
    {
        private String _Masuk;
        private String _Keluar;

        public String Nip { get; set; }
        public String Nama { get; set; }
        public String Masuk
        {
            get { return _Masuk; }
            set
            {
                _Masuk = checkTime(value);
            }
        }
        public String Keluar
        {
            get { return _Keluar; }
            set
            {
                _Keluar = checkTime(value);
            }
        }

        private String checkTime(String str)
        {
            if (str == null || str.Equals("0:00") || str.Equals("12:00 AM"))
                return "-";
            return str;
        }
    }

    public class Izin : Presensi { }

    public class Lembur
    {
        public String Nip { get; set; }
        public String Nama { get; set; }
    }
}
